// npmap.h

#ifndef _npmap_h_
#define _npmap_h_

#if defined(_MSC_VER) && (_MSC_VER > 1000)
	#pragma once
#endif

#include <map>
//#include "np_mem_pool_allocator.h"

template<typename KEY_TYPE,
		typename TYPE,
		typename LESS = std::less<KEY_TYPE>,
		typename ALLOC = std::allocator<TYPE>//np_mem_pool_allocator<TYPE>
		>
struct npmap : public std::map<KEY_TYPE, TYPE, LESS, ALLOC>
{
private:
	typedef std::map<KEY_TYPE, TYPE, LESS, ALLOC> base_map;

public:
#ifdef _DEBUG
	npmap()
	{
	}
	~npmap()
	{
	}
	npmap(const npmap& r) : base_map(r)
	{
	}
	npmap& operator = (const npmap& r)
	{
		(base_map&)*this = (const base_map&)r;
		return *this;
	}
#endif
	typedef typename base_map::iterator iterator;
	iterator erase(iterator it)
		{	this->base_map::erase(it++); return it;	}
	iterator erase(iterator first, iterator last)
		{	this->base_map::erase(first, last); return last;	}
	size_t erase(const KEY_TYPE& key)
		{	return this->base_map::erase(key);	}
};

#endif	// #ifndef _npmap_h_
